import { _decorator } from 'cc';
import { SubStateMachine } from './SubStateMachine';
import { StateMachine } from './StateMachine';
import { DIRECTION_ENUM, DIRECTION_ORDER_ENUM, PARAMS_NAME_ENUM } from '../Enums';
import { State } from './State';

export class DirectionSubStateMachine extends SubStateMachine {
    run(): void {
        const value = this.fms.getParams(PARAMS_NAME_ENUM.DIRECTION);
        this.currentState = this.stateMachines.get(DIRECTION_ORDER_ENUM[value as number]);
    }
}
